# -*- coding: utf-8 -*-
"""
Module Description: orm异常定义
Date: 2018/8/2
Author:Bai Jin Ping
"""


class ORMException(Exception):
    """ORM异常"""


class TransactionsInsertException(Exception):
    """事务重复插入异常"""


class ORMExceptionCode(object):
    """错误码"""
    HTTP_REQUEST_ERROR = 20001  # http请求状态码不是200,会导致json解析出问题,例如url错误导致获得状态码为404
    SDK_ACTION_ERROR = 20002    # SDK执行请求前的错误,例如,取不到ORM服务端节点
    GRPC_NO_UNAVAILABLE_ERROR = 20003  # GRPC非不可用的错误,如超时

